Docker
Home - Docker
fast, easy and portable application development through containerization
If I haven't figured out a way to containerize) an app, I will find a way. Pretty much the backbone of how I deploy and maintain many services.
connections
- portainer
- Nginx Proxy Manager
- Nextcloud
- PhotoPrism
- Wordpress
- NextJS
- ReactJS
- vaultwarden
- Jellyfin
- Plex.tv
- pretty much any of my microservices. Especially if it's public facing
installation
Tips & Tricks
specifiy a file other than docker-compose.yml
or compose.yml
docker-compose -f docker-compose.test.yml up
execute a command
sudo docker exec -it dev-garden-app-1 ls /public # '/public = whatever directory you want to look into'
sudo docker exec -it dev-garden-app-1 /bin/bash # 'heard you like shell inside your shell'
Map Volume on Windows 10
- [link](https://stackoverflow.com/questions/50959475/docker-compose-on-windows-volume-not-working#:~:text=To do so%3A 1 Run the command "set,container rm -f ) 5 Re-run the containers)
1. Launch Docker from your windows taskbar
2. Click on Settings icon on top
3. Click Resources
4. Click File Sharing
5. Click on (+) sign and add path of local folder in which you want to map the container volume.
It worked for me.
"C:\\ProgramData\\Docker\\volumes\\sqldata:c:\\mssql"
macOS app not responding upon launch
-
Go to finder and open
Applications > Utilities > Activity Monitor.app
-
Find
Docker
orDocker Desktop
(it was in Not responding mode in my case) and Force Kill the app. -
Run the following command in Terminal:
sudo rm -rf ~/Library/Containers/com.docker.*
-
Open the setting file in the terminal:
sudo nano ~/Library/Group\ Containers/group.com.docker/settings.json
then find "filesharingDirectories":
- Remove all entries inside this key and leave it as
"filesharingDirectories": [],
save and close the file. - Finally go to the Application folder, find
Docker
and run it (wait sometime, it takes a minute or so to run) - It will run and work like a charm!
Run Docker Compose in Crontab
running docker compose up -d
is the norm when you're already in the same directory as the compose.yml
file, but what if you want to call that same file from a crontab
# spin up container from selected file
docker compose -f /home/mypath/compose.yml up -d
docker compose -f /mnt/uasis5/node/filesystem-livesync-pywriter4/compose.yml up -d
# restart container 'server' named in compose.yml file
docker compose -f /mnt/uasis5/node/filesystem-livesync-pywriter4/compose.yml restart server
- [link](https://www.jamescoyle.net/how-to/docker-compose-files/3323-docker-compose-file-for-watchtower#:~:text=Create a new directory and save the above,from the moment you start the Watchtower container.)